//
//  ViewController.m
//  BTDatabaseAccesser
//
//  Created by XMac on 2018/4/23.
//  Copyright © 2018年 XMac. All rights reserved.
//

#import "ViewController.h"
#import "Person.h"
#import "BGBaseDataAccesser.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self test];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


-(void)test{
    
    Person *person = [Person new];
    person.name = @"xbg";
    person.age = 99;
    
    BGBaseDataAccesser *accesser = [[BGBaseDataAccesser alloc]init];
    [accesser insertObject:person];
    NSArray *result = [accesser queryItemsWithClass:Person.class condition:nil];
    for (Person *p in result) {
        NSLog(@"%@",p.description);
    }
}



@end
